package com.mxpio.erp.inventory.service.impl;

import com.mxpio.erp.common.inventory.entity.VInvLotStockWithSoaHold;
import com.mxpio.erp.common.inventory.service.VInvLotStockWithSoaHoldService;
import com.mxpioframework.jpa.JpaUtil;
import com.mxpioframework.jpa.query.Criteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class VInvLotStockWithSoaHoldServiceImpl implements VInvLotStockWithSoaHoldService {

	@Override
	@Transactional(readOnly = true)
	public List<VInvLotStockWithSoaHold> list(Criteria c) {
		return JpaUtil.linq(VInvLotStockWithSoaHold.class).where(c).list();
	}

	@Override
	@Transactional(readOnly = true)
	public Page<VInvLotStockWithSoaHold> listPage(Pageable pageAble, Criteria c) {
		return JpaUtil.linq(VInvLotStockWithSoaHold.class).where(c).paging(pageAble);
	}
}
